package com.hellacutty.shake;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

public class CountdownBeforeStartActivity extends Activity{

	CountdownAsyncTask _timer;
	TextView _countDownTextView;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.countdownbeforestartactivity);
		_countDownTextView = (TextView) findViewById(R.id.countdownview);
		_timer = new CountdownAsyncTask(this);
		_timer.execute(new Void[0]);
	}

	public void updateCounter(Integer count){
		if(count == 0){
			startActivity(new Intent(getApplicationContext(), CanvasActivity2Player.class));
		}
		else{
			_countDownTextView.setText(count.toString());
		}
	}
}

